package org.krishna.model;



import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "USER_DETAILS")
public class UserDetails implements Serializable{
	
	/** The Constant serialVersionUID. */
	@Transient
	private static final long serialVersionUID = -7660824605183781430L;
	
	
	@Id
	@GeneratedValue
	@Column(name = "USER_ID")
	private long userId;

	@Column(name = "FIRST_NAME")
	private String firstName;
	
	@Column(name = "LAST_NAME")
	private String lastName;
	
	@Column(name = "ROLL_NO")
	private String rollNo;
	
	@Column(name = "USER_NAME")
	private String userName;	

	@Column(name = "PASSWORD")
	private String password;
	
	@Column(name = "MAIL_ID")
	private String mailId;
	
	@Column(name = "CONTACT_NO")
	private int contactNo;
	
	@ManyToOne
	@JoinColumn(name = "CATEGORY")
	private Category category;
	
	
	@Column(name = "MAX_LIMIT")
	private int maxLimit;
	
	@Column(name = "BOOKS_TAKEN")
	private int booksTaken;
	
	@OneToMany(mappedBy = "userDetails")
	private Set<BookDetails> bookDetails;
	
	@OneToMany(mappedBy = "userDetails")
	private Set<Verification> verification;
	
	@OneToMany(mappedBy = "userDetails")
	private Set<TransactionDetails> transactionDetails;

	/**
	 * @return the userId
	 */
	public long getUserId() {
		return userId;
	}

	/**
	 * @param userId the userId to set
	 */
	public void setUserId(long userId) {
		this.userId = userId;
	}

	/**
	 * @return the firstName
	 */
	public String getFirstName() {
		return firstName;
	}

	/**
	 * @param firstName the firstName to set
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * @return the lastName
	 */
	public String getLastName() {
		return lastName;
	}

	/**
	 * @param lastName the lastName to set
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * @return the rollNo
	 */
	public String getRollNo() {
		return rollNo;
	}

	/**
	 * @param rollNo the rollNo to set
	 */
	public void setRollNo(String rollNo) {
		this.rollNo = rollNo;
	}

	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * @param userName the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the mailId
	 */
	public String getMailId() {
		return mailId;
	}

	/**
	 * @param mailId the mailId to set
	 */
	public void setMailId(String mailId) {
		this.mailId = mailId;
	}

	/**
	 * @return the contactNo
	 */
	public int getContactNo() {
		return contactNo;
	}

	/**
	 * @param contactNo the contactNo to set
	 */
	public void setContactNo(int contactNo) {
		this.contactNo = contactNo;
	}

	/**
	 * @return the category
	 */
	public Category getCategory() {
		return category;
	}

	/**
	 * @param category the category to set
	 */
	public void setCategory(Category category) {
		this.category = category;
	}

	/**
	 * @return the maxLimit
	 */
	public int getMaxLimit() {
		return maxLimit;
	}

	/**
	 * @param maxLimit the maxLimit to set
	 */
	public void setMaxLimit(int maxLimit) {
		this.maxLimit = maxLimit;
	}

	/**
	 * @return the booksTaken
	 */
	public int getBooksTaken() {
		return booksTaken;
	}

	/**
	 * @param booksTaken the booksTaken to set
	 */
	public void setBooksTaken(int booksTaken) {
		this.booksTaken = booksTaken;
	}

	/**
	 * @return the bookDetails
	 */
	public Set<BookDetails> getBookDetails() {
		return bookDetails;
	}

	/**
	 * @param bookDetails the bookDetails to set
	 */
	public void setBookDetails(Set<BookDetails> bookDetails) {
		this.bookDetails = bookDetails;
	}

	/**
	 * @return the verification
	 */
	public Set<Verification> getVerification() {
		return verification;
	}

	/**
	 * @param verification the verification to set
	 */
	public void setVerification(Set<Verification> verification) {
		this.verification = verification;
	}

	/**
	 * @return the transactionDetails
	 */
	public Set<TransactionDetails> getTransactionDetails() {
		return transactionDetails;
	}

	/**
	 * @param transactionDetails the transactionDetails to set
	 */
	public void setTransactionDetails(Set<TransactionDetails> transactionDetails) {
		this.transactionDetails = transactionDetails;
	}

	
	
}
